import {createWebHashHistory, createRouter} from "vue-router";



const routes = [
    {
        path: "/adminlogin",
        name: "AdminLoginPage",
        component: import("../pages/AdminLoginPage.vue"),
    },
    {
        path: "/stafflogin",
        name: "StaffLoginPage",
        component: import("../pages/StaffLoginPage.vue"),
    },
    {
        path: "/staffregister",
        name: "StaffRegisterPage",
        component: import("../pages/StaffRegisterPage.vue"),
    },
    {
        path: "/customerlogin",
        name: "CustomerLoginPage",
        component: import("../pages/CustomerLoginPage.vue"),
    },
    {
        path: "/customerregister",
        name: "CustomerRegisterPage",
        component: import("../pages/CustomerRegisterPage.vue"),
    },
    
    {
        path:"/staffpage",
        name:"StaffPage",
        component: import("../pages/StaffPage.vue"),
        children:[
            {
                path: "/staff/staffpersonalcenter",
                name: "StaffPersonalCenter",
                component: import("../pages/staff/StaffPersonalCenter.vue")
            },
            {
                path: "/staff/refundlist",
                name: "RefundList",
                component: import("../pages/staff/RefundList.vue")
            },
            {
                path: "/staff/affairlist",
                name: "AffairList",
                component: import("../pages/staff/AffairList.vue")
            },
            {
                path: "/staff/roomlist",
                name: "RoomList",
                component: import("../pages/staff/RoomList.vue")
            },
        ]
    },

    {
        path: "/",
        name: "IndexPage",
        component: import("../pages/IndexPage.vue"),
        children:[
            {
                path:"/user/roomlistpage",
                name:"RoomListPage",
                component:import("../pages/user/RoomListPage.vue")
            },
            {
                path:"/user/personcenterpage",
                name:"PersonCenterPage",
                component:import("../pages/user/PersonCenterPage.vue")
            },
            {
                path:"/user/myorderpage",
                name:"MyOrderPage",
                component:import("../pages/user/MyOrderPage.vue")
            },
            {
                path:"/user/orderdetailpage",
                name:"OrderDetailPage",
                component:import("../pages/user/OrderDetailPage.vue")
            },
            {
               path:"/user/detailpage",
               name:"DetailPage",
               component:import("../pages/user/DetailPage.vue")
            },
            
        ]
    },
    {
        path: "/admin",
        name: "AdminPage",
        component: import("../pages/AdminPage.vue"),
        children: [
            {
                path: "/admin/userlist",
                name: "UserList",
                component: import("../pages/admin/UserList.vue")
            },
            {
                path: "/admin/adminlist",
                name: "AdminList",
                component: import("../pages/admin/AdminList.vue")
            },
            {
                path: "/admin/meetingroomlist",
                name: "MeetingRoomList",
                component: import("../pages/admin/MeetingRoomList.vue")
            },
            {
                path: "/admin/staffList",
                name: "StaffList",
                component: import("../pages/admin/StaffList.vue")
            },
            {
                path: "/admin/personalcenter",
                name: "PersonalCenter",
                component: import("../pages/admin/PersonalCenter.vue")
            },
            {
                path: "/admin/repairrecordslist",
                name: "RepairRecordsList",
                component: import("../pages/admin/RepairRecordsList.vue")
            },
            {
                path: "/admin/staffprocess",
                name: "StaffProcess.vue",
                component: import("../pages/admin/StaffProcess.vue")
            },
            {
                path: "/admin/userprocess",
                name: "UserProcess",
                component: import("../pages/admin/UserProcess.vue")
            },
            {
                path: "/admin/bookingorderlist",
                name: "BookingOrderList",
                component: import("../pages/admin/BookingOrderList.vue")
            },
            
        ]
    },
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
});

export default router;